Google News
logo
PL/SQL - Interview Questions
Differentiate between % ROWTYPE and TYPE RECORD.
% ROWTYPE is used when a query returns an entire row of a table or view.
 
TYPE RECORD, on the other hand, is used when a query returns column of different tables or views.


Ex: . TYPE r_emp is RECORD (sno smp.smpno%type,sname smp sname %type)
 
e_rec smp %ROWTYPE

Cursor c1 is select smpno,dept from smp;
 
e_rec c1 %ROWTYPE
Advertisement